package com.elcl.util;

import android.app.Activity;
import android.content.Context;
import android.view.inputmethod.InputMethodManager;

import com.elcl.storage.ApplicationCache;

/**
 * Created by lichunlin on 17/1/5.
 * 键盘的相关操作
 */
public class KeyBordutils {

    //收起键盘
    public static void hideKeyBord(Activity activity){
        InputMethodManager imm =  (InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);
        if(imm != null) {
            imm.hideSoftInputFromWindow(activity.getWindow().getDecorView().getWindowToken(),
                    0);
        }
    }
}
